package com.ruoyi.bpm.mapper.oa;

import com.ruoyi.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO;
import com.ruoyi.bpm.domain.oa.BpmOaLeave;
import com.mybatisflex.core.BaseMapper;
import com.ruoyi.common.orm.core.page.TableDataInfo;
import org.apache.ibatis.annotations.Mapper;

/**
 * 请假申请 Mapper
 *
 * @author jason
 * @author 芋道源码
 */
@Mapper
public interface BpmOALeaveMapper extends BaseMapper<BpmOaLeave> {

    //TODO refactor
    default TableDataInfo<BpmOaLeave> selectPage(Long userId, BpmOALeavePageReqVO reqVO) {
//        return selectPage(reqVO, new LambdaQueryWrapperX<BpmOALeaveDO>()
//                .eqIfPresent(BpmOALeaveDO::getUserId, userId)
//                .eqIfPresent(BpmOALeaveDO::getStatus, reqVO.getStatus())
//                .eqIfPresent(BpmOALeaveDO::getType, reqVO.getType())
//                .likeIfPresent(BpmOALeaveDO::getReason, reqVO.getReason())
//                .betweenIfPresent(BpmOALeaveDO::getCreateTime, reqVO.getCreateTime())
//                .orderByDesc(BpmOALeaveDO::getId));
        return null;
    }

}
